package com.bc.bczbweb.controller.Ajax;

import com.baidu.disconf.client.utils.StringUtil;
import com.bc.commoncore.util.StringUtils;
import com.bc.commonentity.common.JsonResult;
import com.bc.bcapi.service.T_User_buyer_infoService;
import com.bc.bcmodel.domain.T_User_buyer_infoModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.POST;
import java.math.BigInteger;

@RestController
@RequestMapping("ajax/t_user_buyer_info")
public class AjaxT_User_buyer_infoController {
    @Autowired
    T_User_buyer_infoService t_User_buyer_infoService;

    @POST
    @RequestMapping(value = "add", method = RequestMethod.POST)
    public JsonResult add(T_User_buyer_infoModel req) throws Exception {
        JsonResult js = new JsonResult();
        if (StringUtils.isEmpty(req.getUser_id())) {
            throw new Exception("用户ID不能为空");
        }
        t_User_buyer_infoService.update(req);
        return js;
    }
}